<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <title>添加文章</title>
    <link rel="stylesheet" href="./css/font-awesome.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <link rel="stylesheet" href="https://www.jq22.com/jquery/bootstrap-3.3.4.css">
    <link rel="stylesheet" href="https://at.alicdn.com/t/font_1805932_ysrcp4y0uy9.css">
    <!-- 引入layui样式表 -->
    <link rel="stylesheet" href="./lib/layui/css/layui.css">
    <!-- 引入bootstrap -->
    <link rel="stylesheet" href="./css/bootstrap.min.css">
    <!-- 引入文件上传样式 -->
    <link rel="stylesheet" href="./css/uploadImg.css">
    <!-- 引入自己的样式表 -->
    <link rel="stylesheet" href="./css/art_pub.css">
    <script type="text/javascript" src="./js/xadmin.js"></script>
</head>

<body>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <!-- 这是文章列表、修改、删除、增加 -->
            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                <ul class="layui-tab-title">
                    <li class="layui-this">基本信息</li>
                    <li>文章正文</li>
                    <li>关键字描述</li>
                </ul>
                <div class="layui-tab-content">
                    <!-- 基本信息页 -->
                    <div class="layui-tab-item layui-show">
                        <form class="layui-form" action="" lay-filter="test1">

                            <!-- 文章标题 -->
                            <div class="layui-form-item">
                                <label class="layui-form-label">文章标题:</label>
                                <div class="layui-input-block">
                                    <input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input input_box" id="wen_title">
                                </div>
                            </div>

                            <!-- 文章分类 -->
                            <div class="layui-form-item">
                                <label class="layui-form-label">文章分类:</label>
                                <div class="layui-input-block" id="select">
                                    <select name="city" lay-filter="category" id="select-1">
                                    </select>
                                </div>
                            </div>

                            <!-- 文章作者-->
                            <div class="layui-form-item">
                                <label class="layui-form-label">文章作者:</label>
                                <div class="layui-input-block">
                                    <input type="text" name="author" required lay-verify="required" placeholder="请输入作者" autocomplete="off" class="layui-input input_box" id="wen_author">
                                </div>
                            </div>

                            <!-- 复选框 -->
                            <div class="layui-form-item">
                                <label class="layui-form-label">复选框:</label>
                                <div class="layui-input-block" id="tags">

                                </div>
                            </div>

                            <!-- 阅读次数-->
                            <div class="layui-form-item">
                                <label class="layui-form-label">阅读次数:</label>
                                <div class="layui-input-block">
                                    <input type="text" name="click" required lay-verify="required" placeholder="请输入次数" autocomplete="off" class="layui-input input_box" id='wen_click'>
                                </div>
                            </div>

                            <!-- 是否推荐 -->
                            <div class="layui-form-item">
                                <label class="layui-form-label">是否推荐:</label>
                                <div class="layui-input-block">
                                    <input type="checkbox" name="istop" lay-skin="switch">
                                </div>
                            </div>

                            <!-- 缩略图 -->
                            <div class="layui-form-item">
                                <label class="layui-form-label">缩略图:</label>
                                <div class="layui-input-block">
                                    <div id="imgBox"><img src="" id="dogimg"></div>
                                    <div class="main">
                                        <div class="upload-content">
                                            <div class="content-img">
                                                <ul class="content-img-list"></ul>
                                                <div class="file">
                                                    <i class=" layui-icon layui-icon-add-1" id="jia"></i>
                                                    <input type="file" name="file" accept="image/*" id="upload" multiple>
                                                </div>
                                            </div>
                                            <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
                                                <div class="modal-dialog modal-lg" role="document">
                                                    <div class="modal-content">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!-- 按钮组 -->
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn layui-btn-danger" lay-submit lay-filter="formDemo">修改文章</button>
                                    <button type="reset" class="layui-btn layui-btn-red">清空</button>
                                </div>
                            </div>
                        </form>
                    </div>

                    <!-- 文章正文页 -->
                    <div class="layui-tab-item">
                        <!-- 富文本 -->
                        <div class="layui-form-item">
                            <label class="layui-form-label">文章正文:</label>
                            <div class="layui-input-block" id="textarea">
                                <textarea id="fotext" name="content" style="display:none;" lay-verify="content"></textarea>
                            </div>
                        </div>

                        <!-- 按钮组 -->
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn layui-btn-danger" lay-submit lay-filter="formDemo">修改文章</button>
                                <button type="reset" class="layui-btn layui-btn-red">清空</button>
                            </div>
                        </div>
                    </div>

                    <!-- 关键字描述 -->
                    <div class="layui-tab-item">
                        <!-- 关键字 -->
                        <div class="layui-form-item">
                            <label class="layui-form-label">关键字:</label>
                            <div class="layui-input-block">
                                <input type="text" name="title" required lay-verify="required" placeholder="多个关键字请用英文逗号隔开" autocomplete="off" class="layui-input" id="keywords">
                            </div>
                        </div>

                        <!-- 文本域 -->
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">描述</label>
                            <div class="layui-input-block">
                                <textarea name="desc" placeholder="请输入内容" class="layui-textarea" id="description"></textarea>
                            </div>
                        </div>

                        <!-- 按钮组 -->
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn layui-btn-danger" lay-submit lay-filter="formDemo">修改文章</button>
                                <button type="reset" class="layui-btn layui-btn-red">清空</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
</body>
<!-- 下拉选择框 -->
<script type="text/html" id="tpl-select">
    <option value=""></option>
    {{each data}}
    <option value="{{$value.id}}" data-cateid="{{$value.id}}">{{$value.catename}}</option>
    {{/each}}
</script>
<!-- 标签 -->
<script type="text/html" id="tpl-tags">
    {{each data}}
    <input type="checkbox" name="tagname" title="{{$value.tagname}}" lay-skin="primary" id="checkbox"> {{/each}}
</script>

<!-- 导入jq -->
<script src="./js/jquery.min.js"></script>
<!-- 导入layui -->
<script src="./lib/layui/layui.all.js"></script>
<!-- 导入bootstrap -->
<script src="./js/bootstrap.min.js"></script>
<!-- 导入文件上传 -->
<script src="./js/uploadImg.js"></script>
<!-- 导入template -->
<script src="./js/template-web.js"></script>
<!-- 导入自己的js -->
<script src="./js/art_pub.js"></script>

</html>